﻿using System;

using NUnit.Framework;
using Spring.Testing.NUnit;
using VisualAgile.Model;
using VisualAgile.IBLL;

namespace VisualAgile.UnitTest
{
    [TestFixture]
    public  class ProjectManagerTest :AbstractTransactionalDbProviderSpringContextTests
    {
        protected override string[] ConfigLocations
        {
            get
            {
                return new String[] { "objects.xml" };
            }
        }

        protected IProjectManager ProjectManager
        {
            get
            {
                return applicationContext.GetObject("ProjectManagerTrans") as IProjectManager;
            }
        }

        [Test]
        public void SaveProjectTest()
        {
            Project project = ProjectManager.NewProject();                        
            project.Name = "project";

            ProjectManager.Save(project);
            transactionManager.Commit(transactionStatus);
        }
    }
}
